home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: Help with pointer alignment
- Date: 08 Feb 1996 03:44:54 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Feb7204454@qcd.lanl.gov>
- References: <4fb0op$8l8@hermes.louisville.edu>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: arwild01@homer.louisville.edu's message of 7 Feb 1996 20:06:49 GMT
-
- In article <4fb0op$8l8@hermes.louisville.edu>
- arwild01@homer.louisville.edu (Alan Wild) writes:
- <snip>
- I am having a small problem with pointer alignment in a library I am
- developing. lint reports:
-
- "queue.c", line 13: warning: possible pointer alignment problem, op CAST
-
- lint is posibly at fault here.
- <snip>
- queueentry *temp = (queueentry *)malloc( sizeof( queueentry ) );
-
- Make sure that you have #included <stdlib.h> (necessary unless you
- have otherwise declared malloc), and remove the cast (an advice not
- everyone agrees with).
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-